package com.jrx.anytxn.reporting.job.xib.step;

import com.jrx.anytxn.reporting.entity.CmInteCoLonRepayPlan;
import com.jrx.anytxn.reporting.mapper.base.CmInteCoLonRepayPlanMapper;
import org.springframework.batch.item.ItemWriter;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @comment: 贷款还款计划报表Writer
 * @author: hsoong
 * @date: 2021/7/2 10:04
 */
@Service
public class RepayPlanReportingWriter implements ItemWriter<CmInteCoLonRepayPlan> {

    @Resource
    CmInteCoLonRepayPlanMapper cmInteCoLonRepayPlanMapper;

    @Override
    public void write(List<? extends CmInteCoLonRepayPlan> list) throws Exception {
        for (CmInteCoLonRepayPlan item : list) {
            cmInteCoLonRepayPlanMapper.insertSelective(item);
        }
    }

}
